package com.lsy.system.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lsy.system.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lsy.vo.UserVO;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author lsy
 * @since 2022-02-12
 */
public interface UserService extends IService<User> {
    IPage<User> findUserPage(Page<User> page,QueryWrapper<User> wrapper);

    /**
     * 添加
     * @param user
     */
    void addUser(User user);

    List<User> findExportUser(@Param("userVo") UserVO userVO);

    Page<User> findUserList(Page<User> page,UserVO uservO);
    /**
     * 导出用户Excel
     * @param response
     * @param tbUsers
     * @throws IOException
     */
    void exportUserExcel(HttpServletResponse response, List<User> tbUsers) throws IOException;

    List<User> findUsers(UserVO userVO);

    /**
     * 实现登录
     * @param username
     * @param password
     * @return
     */
    String login(String username, String password);
}
